<template>
	<view class="uni-popup-message" style="letter-spacing:4rpx">
		<view>
			<image mode="aspectFit" src="../../static/jinggao.png" style="width: 32rpx;height: 32rpx;"></image>
			<text style="margin-left: 10rpx;">限时奖</text>
		</view>
		<view style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;font-size: 30rpx;">
			<text style=" margin-top: 30rpx;">您好，现在分享给好友</text>
			<view style=" display: flex;">
				<text>您可以:</text>
				<view style="display: flex;flex-direction: column;margin-left: 20rpx;">
					<text>· 1.额外获得1-3天免费测算</text>
					<text>· 2.仅本次有效</text>
				</view>
			</view>
		</view>

		<view style="width: 90%; display: flex;justify-content: space-between; margin-top: 40rpx;">
			<button @click="share" open-type="share" style="width: 235rpx;height: 70rpx;background-color: #EFBC79;font-size: 26rpx;color: #555555;">告诉朋友</button>
			<button @click="closevipshare" style="width: 235rpx;height: 70rpx;background-color: #F38282;font-size: 26rpx;color: #555555;">放弃机会</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	inject: ['popup'],
	onShareAppMessage: function(res) {
		console.log("myid=" + helper.myUserInfo.id);
		if (res.from === 'button') {
			// 来自页面内转发按钮
		}
		return {
			title: '来测一测今日财神方位！',
			path: 'pages/homePage?commentUserId=' + helper.myUserInfo.id
		};
	},
	methods: {
		share() {
			this.$emit('shareVip', () => {
				this.popup.close();
			});
		},
		closevipshare() {
			this.$emit('closevipshare', () => {
				this.popup.close();
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.uni-popup-message {
	/* #ifndef APP-NVUE */
	display: flex;
	/* #endif */
	width: 600rpx;
	padding-top: 21rpx;
	padding-bottom: 21rpx;
	background-color: #d45151;
	border-radius: 15rpx;
	box-shadow: 3px 3px 1px #888888;
	font-size: 30rpx;
	color: #ffffff;

	flex-direction: column;
	justify-content: center;
	align-items: center;
}
</style>
